<template>
  <div>
    来自 grandFather 组件的数据 {{msg}}
    来自全局依赖的数据 {{globalData}}
  </div>
</template>

<script setup>
import { inject } from 'vue';
import {globalKey} from '@/utils/symbolKeys.js'

const msg = inject('msg','我是默认值')
const globalData = inject(globalKey,'默认对象')
</script>